package com.clouds.wms.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.clouds.wms.bean.Salmf;
import com.clouds.wms.dao.SalmeDao;
import com.clouds.wms.dao.SalmfDao;
import com.clouds.wms.exception.SysException;
import com.clouds.wms.util.PagesBean;

@Service("salmfService")
public class SalmfServiceImpl implements SalmfService {
	@Resource(name="salmfDao")
	private SalmfDao salmfDao;
	@Resource(name="salmeDao")
	private SalmeDao salmeDao;

	@Override
	public PagesBean getSalmfList(String meaa, String meab, int offset,	int pageSize) throws SysException {
		return salmfDao.getSalmfList(meaa, meab, offset, pageSize);
	}

	@Override
	public int saveSalcb(Salmf salmf) throws SysException {
		return salmfDao.saveSalmf(salmf);
	}

	@Override
	public int getMaxMfac() throws SysException {
		return salmfDao.getMaxMfac();
	}

	@Override
	public int delSalmf(String mfaa, String mfab, String mfacs)	throws SysException {
		return salmfDao.delSalmf(mfaa, mfab, mfacs);
	}

	@Override
	public int updateSalcb(Salmf salmf) throws SysException {
		return salmfDao.updateSalmf(salmf);
	}

	@Override
	public int changeStatus(String mfaa, String mfab, String status)throws SysException {
		return salmfDao.changeStatus(mfaa, mfab, status);
	}

	@Override
	public void delSalmemf(String meaa, String meab) throws SysException {
		salmeDao.delSalmeByAaAb(meaa, meab);
		salmfDao.delSalmfByAaAb(meaa, meab);
	}

	@Override
	public void delSalmfAll(String meaa, String meab) throws SysException {
		salmfDao.delSalmfByAaAb(meaa, meab);
	}
}
